<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/view/modules/sys/include/taglib.jsp"%>
<%@ include file="/WEB-INF/view/modules/sys/include/head.jsp"%>
<div class="main-container">
    <div class="padding-md">
        <div class="col-md-6">
            <div class="smart-widget">
                <div class="smart-widget-header">
                    积分管理
                    <span class="smart-widget-option">
										<span class="refresh-icon-animated">
											<i class="fa fa-circle-o-notch fa-spin"></i>
										</span>
			                            <a href="#" class="widget-toggle-hidden-option">
			                                <i class="fa fa-cog"></i>
			                            </a>
			                            <a href="#" class="widget-collapse-option" data-toggle="collapse">
			                                <i class="fa fa-chevron-up"></i>
			                            </a>
			                            <a href="#" class="widget-refresh-option">
			                                <i class="fa fa-refresh"></i>
			                            </a>
			                            <a href="#" class="widget-remove-option">
			                                <i class="fa fa-times"></i>
			                            </a>
			                        </span>
                </div>
                <div class="smart-widget-inner">
                    <div class="smart-widget-hidden-section">
                        <ul class="widget-color-list clearfix">
                            <li style="background-color:#20232b;" data-color="widget-dark"></li>
                            <li style="background-color:#4c5f70;" data-color="widget-dark-blue"></li>
                            <li style="background-color:#23b7e5;" data-color="widget-blue"></li>
                            <li style="background-color:#2baab1;" data-color="widget-green"></li>
                            <li style="background-color:#edbc6c;" data-color="widget-yellow"></li>
                            <li style="background-color:#fbc852;" data-color="widget-orange"></li>
                            <li style="background-color:#e36159;" data-color="widget-red"></li>
                            <li style="background-color:#7266ba;" data-color="widget-purple"></li>
                            <li style="background-color:#f5f5f5;" data-color="widget-light-grey"></li>
                            <li style="background-color:#fff;" data-color="reset"></li>
                        </ul>
                    </div>
                    <div class="smart-widget-body">
                        <form action="${ctx}/grade/gradeInsert" method="post" class="form-horizontal no-margin" id="type-constraint" novalidate="">
                            <div class="form-group">
                                <label class="control-label col-lg-3">ID</label>
                                <div class="col-lg-9">
                                    <input type="text" name="id" class="form-control input-sm" data-parsley-type="email" placeholder="请输入ID">
                                </div><!-- /.col -->
                            </div><!-- /form-group -->
                            <div class="form-group">
                                <label class="control-label col-lg-3">用户ID</label>
                                <div class="col-lg-9">
                                    <input type="text" name="userId" class="form-control input-sm" data-parsley-type="url" placeholder="请输入用户ID">
                                </div><!-- /.col -->
                            </div><!-- /form-group -->
                            <div class="form-group">
                                <label class="control-label col-lg-3">用户积分</label>
                                <div class="col-lg-9">
                                    <input type="text" name="value" class="form-control input-sm" data-parsley-type="digits" placeholder="请输入积分">
                                </div><!-- /.col -->
                            </div><!-- /form-group -->
                            <div class="form-group">
                                <label class="control-label col-lg-3">用户等级</label>
                                <div class="col-lg-9">
                                    <input type="text" name="level" class="form-control input-sm" data-parsley-type="integer" placeholder="请输入等级">
                                </div><!-- /.col -->
                            </div><!-- /form-group -->
                            <div class="text-right m-top-md">
                                <button type="submit" class="btn btn-info">提交</button>
                            </div>
                        </form>
                    </div>
                </div><!-- ./smart-widget-inner -->
            </div><!-- ./smart-widget -->
        </div>
    </div>
</div>
<%@include file="/WEB-INF/view/modules/sys/include/footerlib.jsp"%>
<script>
    $(document).ready(function() {
        $("#type-constraint").validate({
            rules:{
                userId: "required",
                value :{
                    required: true,
                    min:0
                }
            },
            messages: {
                userId:"用户ID不能为空",
                value :{
                    required:"积分不能为空",
                    min:"积分不能为负数"
                }
            }
        })
    })
</script>
</body>
</html>